################################################################################
# Copyright (C) 2014 Jeremy Brodt and Kevin Gillespie
# $Id: Makefile 46 2014-04-22 04:40:46Z brodtj1212@gmail.com $
################################################################################

# This is the name of the build output file
PROJECT=adc

# Increase heap size
HEAP_SIZE=8192

# Set this variable to '1' to build for an emulator target
EMULATOR=0

# This is the path to the CMSIS root directory
CMSIS_ROOT=../../Libraries/CMSIS

# These are library directories
PERIPH_DRIVER_DIR=../../Libraries/MAX32550PeriphDriver

# Source files for this test (add path to VPATH below)
SRCS  = main.c

# Add libraries
LIBS  = ${PERIPH_DRIVER_DIR}/Build/MAX32550PeriphDriver.a

# Where to find source files for this test
VPATH  = .
VPATH += ${PERIPH_DRIVER_DIR}/Source

# Where to find header files for this test
IPATH  = .
IPATH += ${PERIPH_DRIVER_DIR}/Include

# Point this variable to a startup file to override the default file
#STARTUPFILE=start.S

# Point this variable to a linker file to override the default file
#LINKERFILE=$(CMSIS_ROOT)/Device/Maxim/MAX32550/Source/GCC/max32550_ram.ld

# Include the rules for building for this target
include $(CMSIS_ROOT)/Device/Maxim/MAX32550/Source/GCC/max32550.mk

################################################################################
# Add project specific makefile targets from here

# Rule to build the Peripheral Driver Library
${PERIPH_DRIVER_DIR}/Build/MAX32550PeriphDriver.a:
	make -C ${PERIPH_DRIVER_DIR} lib ${EXT_LIB_DEFS}

# The rule to clean out all the build products.
distclean: clean
	$(MAKE) -C ${PERIPH_DRIVER_DIR} clean

